Skip to content

Conversation

@ToMESSKa
Copy link
Contributor

@ToMESSKa ToMESSKa commented Dec 17, 2025

INSTUI-4805

ISSUE:

  • RangeInput needs to be migarted to the new theming system

TEST PLAN:

@ToMESSKa ToMESSKa changed the title Inst UI 4805 range input rework [v12] feat(ui-form-field): rework RangeInput Dec 17, 2025
@ToMESSKa ToMESSKa self-assigned this Dec 17, 2025
@github-actions
Copy link

github-actions bot commented Dec 17, 2025

PR Preview Action v1.6.3

🚀 View preview at
https://instructure.design/pr-preview/pr-2318/

Built to branch gh-pages at 2025-12-23 11:09 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

const thumbPosition = {
deprecated: {
marginTop: `calc(-1 * ${componentTheme.handleSize} / 4)`
marginTop: `calc(-1 * ${componentTheme.handleSize} / 4 - 1px)`
Copy link
Contributor Author

@ToMESSKa ToMESSKa Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the track got a '1px' wide border, the thumb position changed too so I adjusted the missing pixels here,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels a bit magic to me, maybe you could create a const for the borderwidth and use that above and here, also a comment like this would be good in the code

@ToMESSKa ToMESSKa changed the title [v12] feat(ui-form-field): rework RangeInput [v12] feat(ui-range-input): rework RangeInput Dec 17, 2025
@ToMESSKa ToMESSKa force-pushed the INSTUI-4805-range-input-rework branch from 5b5c44f to de126e9 Compare December 17, 2025 15:50
Copy link
Collaborator

@adamlobler adamlobler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the original component the padding around the value tooltip was only a horizontal padding, now its a full padding, we should revert this to the original one:

Image

Other than that, it looks okay. There’s just one more small thing, but we should update the tokens as well since we don’t have a proper solution right now... The focus ring isn’t visible in the dark theme, and we don’t currently have a focus color that fits here. I’ll update the tokens and get back to you with a solution:

Image

@ToMESSKa ToMESSKa force-pushed the INSTUI-4805-range-input-rework branch from de126e9 to 21f414b Compare December 18, 2025 14:44
@ToMESSKa
Copy link
Contributor Author

On the original component the padding around the value tooltip was only a horizontal padding, now its a full padding, we should revert this to the original one:

Image Other than that, it looks okay. There’s just one more small thing, but we should update the tokens as well since we don’t have a proper solution right now... The focus ring isn’t visible in the dark theme, and we don’t currently have a focus color that fits here. I’ll update the tokens and get back to you with a solution: Image

@adamlobler Now the padding token only applies the horizontal padding, I set the vertical padding to 0. Also the focus ring should be okay now, can you check it please?

@ToMESSKa ToMESSKa requested a review from adamlobler December 18, 2025 14:58
Copy link
Collaborator

@adamlobler adamlobler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The paddings and the focusBorder looks okay, thanks for the modification👌 We just need to make some smaller modifications on the token values but its not on your side.

@ToMESSKa ToMESSKa force-pushed the INSTUI-4805-range-input-rework branch from 21f414b to 5ef95fd Compare December 23, 2025 11:05
Comment on lines +30 to +31
function boxShadowToCSSString(boxShadowObject: TokenBoxshadowValueInst) {
// weird string concatenation is to make it look nice in the debugger
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this from this PR: #2282

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that one is merged now, please check if you have any conflicts

@ToMESSKa ToMESSKa requested review from balzss and removed request for joyenjoyer December 23, 2025 11:06
small: {
fontSize: componentTheme.valueSmallFontSize,
padding: componentTheme.valueSmallPadding,
padding: `${'0 ' + componentTheme.valueSmallPadding}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you only want to set the right and left paddings, a better approach would be to use the paddingInline css prop so you don't have to set the top and bottom to 0

const thumbPosition = {
deprecated: {
marginTop: `calc(-1 * ${componentTheme.handleSize} / 4)`
marginTop: `calc(-1 * ${componentTheme.handleSize} / 4 - 1px)`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels a bit magic to me, maybe you could create a const for the borderwidth and use that above and here, also a comment like this would be good in the code

Comment on lines +30 to +31
function boxShadowToCSSString(boxShadowObject: TokenBoxshadowValueInst) {
// weird string concatenation is to make it look nice in the debugger
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that one is merged now, please check if you have any conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants